package com.sike.javacore.serializer.serializable;

import com.sike.javacore.serializer.serializable.dto.Person;
import com.sike.javacore.serializer.serializable.dto.Woman;

import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;

public class Serializable02 {

    public static void main(String[] args) throws Exception {
        ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream("woman.txt"));

        Person person = new Person("李四",30,180F);
        Woman woman = new Woman("黄颜色",person);

        oos.writeObject(woman);
    }
}
